﻿
#include <string.h>
#include "CXXLOBJECT.HPP"
#include <Sys\RenderUnit\SYSDDCLASSID.HPP>
#include <Sys\RenderUnit\SysDatagramDisposal_D3D\VERTEXREGISTRYDDD3D9.HPP>
#include <Sys\RenderUnit\SysDatagramDisposal_D3D\STAGEDDD3D9.HPP>
#include <Sys\RenderUnit\SysDatagramDisposal_D3D\POSTDRAWDDD3D9.HPP>

using namespace CxxlMan;

cxxlObject *cxxlFASTCALL New_CTestDDD3D();
cxxlObject *cxxlFASTCALL New_CVertexDD_NC_D3D9();
cxxlObject *cxxlFASTCALL New_CVertexDD_NT_D3D9();
cxxlObject *cxxlFASTCALL New_CVertexDD_T_D3D9();
cxxlObject *cxxlFASTCALL New_CVertexDD_C_D3D9();
cxxlObject *cxxlFASTCALL New_CVertexDD_N_D3D9();
cxxlObject *cxxlFASTCALL New_CTrianglesStripDD_D3D9();
cxxlObject *cxxlFASTCALL New_CTrianglesListDD_D3D9();
cxxlObject *cxxlFASTCALL New_CSolidDD_D3D9();
cxxlObject *cxxlFASTCALL New_CLightAttribDD_D3D9();
cxxlObject *cxxlFASTCALL New_CControlAttribDD_D3D9();
cxxlObject *cxxlFASTCALL New_CGroupDD_D3D9();
cxxlObject *cxxlFASTCALL New_CAnchorDD_D3D9();
cxxlObject *cxxlFASTCALL New_CLightSourceMgrDD_D3D9();
cxxlObject *cxxlFASTCALL New_CTextureDD_2D_D3D9();
cxxlObject *cxxlFASTCALL New_CMutiTextureDD_D3D9();
cxxlObject *cxxlFASTCALL New_CCubemapTextureDD_D3D9();
cxxlObject *cxxlFASTCALL New_CVertexRegistryDDD3D9();
cxxlObject *cxxlFASTCALL New_CStageDDD3D9();
cxxlObject *cxxlFASTCALL New_CPostDrawDDD3D9();


extern "C" CXXL_DLLEXPORT
cxxlObject * cxxlCDECL CxxlMan_ObjectFactory(const wchar_t *ClassID, void *Arg, ISpirit *spirit)
{
  if(wcscmp(ITest_ClassID, ClassID) == 0)  
    return New_CTestDDD3D();

  if(wcscmp(ITextureRD_2D_ClassID, ClassID) == 0)  
    return New_CTextureDD_2D_D3D9();

  if(wcscmp(ICubemapTextureRD_ClassID, ClassID) == 0)  
    return New_CCubemapTextureDD_D3D9();

  if(wcscmp(IMutiTextureRD_ClassID, ClassID) == 0)  
    return New_CMutiTextureDD_D3D9();

  else if(wcscmp(IVertex_NC_ClassID, ClassID) == 0)
    return New_CVertexDD_NC_D3D9();

  else if(wcscmp(IVertex_C_ClassID, ClassID) == 0)
    return New_CVertexDD_C_D3D9();

  else if(wcscmp(IVertex_N_ClassID, ClassID) == 0)
    return New_CVertexDD_N_D3D9();

  else if(wcscmp(IVertex_NT_ClassID, ClassID) == 0)
    return New_CVertexDD_NT_D3D9();

  else if(wcscmp(IVertex_T_ClassID, ClassID) == 0)
    return New_CVertexDD_T_D3D9();

  else if(wcscmp(ITrianglesStrip_ClassID, ClassID) == 0)
    return New_CTrianglesStripDD_D3D9();

  else if(wcscmp(ITrianglesList_ClassID, ClassID) == 0)
    return New_CTrianglesListDD_D3D9();

  else if(wcscmp(ILightAttrib_ClassID, ClassID) == 0)
    return New_CLightAttribDD_D3D9();

  else if(wcscmp(IControlAttrib_ClassID, ClassID) == 0)
    return New_CControlAttribDD_D3D9();

  else if(wcscmp(ISolid_ClassID, ClassID) == 0)
    return New_CSolidDD_D3D9();

  else if(wcscmp(IGroup_ClassID, ClassID) == 0) 
    return New_CGroupDD_D3D9();

  else if(wcscmp(IAnchor_ClassID, ClassID) == 0)
    return New_CAnchorDD_D3D9();

  else if(wcscmp(ILightSourceMgr_ClassID, ClassID) == 0)
    return New_CLightSourceMgrDD_D3D9();

  else if(wcscmp(IVertexRegistryD3D9_ClassID, ClassID) == 0) 
    return New_CVertexRegistryDDD3D9();

  else if(wcscmp(IStageD3D9_ClassID, ClassID) == 0) 
    return New_CStageDDD3D9();

  else if(wcscmp(IPostDrawDDD3D9_ClassID, ClassID) == 0) 
    return New_CPostDrawDDD3D9();

  return NULL;
}

